<?php

namespace app\admin\model\user\money;

use app\common\model\order\Order;
use app\common\model\User;
use think\Model;

class Log extends Model
{
    // 表名
    protected $name = 'user_money_log';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = false;

    // 追加属性
    protected $append = [];





    public function user()
    {
        return $this->belongsTo(User::class, 'user_id', 'id', [], 'left')->setEagerlyType(0);
    }

    public function order()
    {
        return $this->belongsTo(Order::class, 'order_sn', 'sn', [], 'left')->setEagerlyType(0);
    }
}
